nums=[13,27,38,49,65,76,97]
target=38
def erfen(nums,target):
    leftPointer,rightPointer=0,len(nums)

    while leftPointer<=rightPointer:
        midPointer=(leftPointer+rightPointer)>>1
        if nums[midPointer]==target:
            return midPointer
        elif nums[midPointer]<target:
            leftPointer=midPointer+1
        else:
            rightPointer=midPointer-1

    return -1
print(erfen(nums,target))


